package main

import (
	"gin_project/common"
	"github.com/gin-gonic/gin"
)

//项目入口
func main() {
	//初始化数据库-->
	db := common.GetDB()
	defer db.Close()
	//main关闭之后延时关闭
	r := gin.Default()
	CollectRoute(r)

	err := r.Run(":8080")
	if err != nil {
		return
	}
	println("监听端口是:8080")
}
